<div class="panel panel-default">
	<div class="panel-heading" role="tab" id="headingOne">
		<h5 class="panel-title">
			<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">参数配置</a>
		</h5>
	</div>
	<div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
		<div class="panel-body">
		
			<input type="hidden" name="reply_id" value="{$reply['id']}" />
			
			<!-- <div class="panel panel-info">
				<div class="panel-heading">温馨提示</div>
				<div class="panel-body" style="color: #3c763d;">
					啦啦啦啦啦啦啦啦啦啦<br/>
					啦啦啦啦啦啦啦啦啦啦
					<br/><br/>
				</div>
			</div> -->
			
			<br/>
			
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span>活动提示</label>
				<div class="col-sm-9">
					<textarea class="form-control content" name="talk"   placeholder="关键词回复的内容"  rows="4" onkeyup="if (this.value.split('\n').length>4) this.rows=this.value.split('\n').length;">{$reply['talk']}</textarea>
					<div class="help-block">
						<strong class="text-danger">用户回复关键词跳出的提示内容，提示用户参与活动<br/>
							#昵称# 变量词，自动获取参与人昵称<br/>
							#文章链接# 自动获取下方需用户转发的文章链接，无需改动
						</strong>
					</div>
				</div>
			</div>
			
			<div class="tab-content">
			<input type="hidden" id="type" name="type" value="{$reply['type']}" />
			<div class="tab-pane {php if($reply['type'] == 0) echo 'active';}" id="article">
			
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">分享类型</label>
				<div class="col-sm-9" id="myTab">
					<label class="radio-inline">
						<a href="#article"><button type="button" class="btn btn-default active">文章</button></a>
					</label>
					<label class="radio-inline">
						<a href="#image"><button type="button" class="btn btn-default">图片</button></a>
					</label>
				</div>
			</div>

			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span>文章链接</label>
				<div class="col-sm-9">
					<input type="text" class="form-control"  name="url1"  placeholder="http://www.baidu.com"  value="{$reply['url1']}">
					<span class='help-block'>
						<strong class="text-danger">需要用户分享的文章链接</strong>
					</span>
				</div>
			</div>
			
			</div>
			<div class="tab-pane {php if($reply['type'] == 1) echo 'active';}" id="image">
			
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">分享类型</label>
				<div class="col-sm-9" id="myTab">
					<label class="radio-inline">
						<a href="#article"><button type="button" class="btn btn-default">文章</button></a>
					</label>
					<label class="radio-inline">
						<a href="#image"><button type="button" class="btn btn-default active">图片</button></a>
					</label>
				</div>
			</div>
			
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span>分享图片</label>
				<div class="col-sm-9">
					{php load()->func('tpl');}
					{php echo tpl_form_field_image('img',$reply['img']);}
					<div class="help-block">
						<strong class="text-danger">需要用户分享朋友圈的海报图片</strong></div>
				</div>
			</div>
			
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span>转发内容</label>
				<div class="col-sm-9">
					<textarea class="form-control content" name="zhuanfa"   placeholder="要转发的内容"  rows="4" onkeyup="if (this.value.split('\n').length>4) this.rows=this.value.split('\n').length;">{$reply['zhuanfa']}</textarea>
					<span class='help-block'>
						<strong class="text-danger">需要用户转发朋友圈时写上的文字内容
						</strong>
					</span>
				</div>
			</div>
			
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span>转发成功回复</label>
				<div class="col-sm-9">
					<textarea class="form-control content" name="awardtalk"   placeholder="转发成功回复的内容"  rows="4" onkeyup="if (this.value.split('\n').length>4) this.rows=this.value.split('\n').length;">{$reply['awardtalk']}</textarea>
					<div class="help-block">
						<strong class="text-danger">转发成功回复的内容。<br/>
							#昵称# 用户的昵称<br/>
							#单次积分# 本次活动用户获得的积分<br/>
							#剩余积分# 用户目前的积分余额<br/>
							#兑换码# 用户本次活动获得的兑换码
						</strong>
					</div>
				</div>
			</div>
			
			<div class="tab-content">
			<input type="hidden" id="award_type" name="award_type" value="{$reply['award_type']}" />
			
			<div class="tab-pane {php if($reply['award_type'] == 0) echo 'active';}" id="none">
			
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span>奖励类型</label>
				<div class="col-sm-9" id="myTab1">
					<label class="radio-inline">
						<a href="#none"><button type="button" class="btn btn-default active">无奖励</button></a>
					</label>
					<label class="radio-inline">
						<a href="#jifen"><button type="button" class="btn btn-default">积分</button></a>
					</label>
					<label class="radio-inline">
						<a href="#sn"><button type="button" class="btn btn-default">兑换码</button></a>
					</label>
				</div>
			</div>
			
			</div>
			
			<div class="tab-pane {php if($reply['award_type'] == 1) echo 'active';}" id="jifen">
			
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span>奖励类型</label>
				<div class="col-sm-9" id="myTab1">
					<label class="radio-inline">
						<a href="#none"><button type="button" class="btn btn-default">无奖励</button></a>
					</label>
					<label class="radio-inline">
						<a href="#jifen"><button type="button" class="btn btn-default active">积分</button></a>
					</label>
					<label class="radio-inline">
						<a href="#sn"><button type="button" class="btn btn-default">兑换码</button></a>
					</label>
				</div>
			</div>
			
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span>奖励积分</label>
				<div class="col-sm-9">
					<input type="text" class="form-control"  name="jifen"  value="{$reply['jifen']}">
					<span class='help-block'>
						<strong class="text-danger">完成任务获得的积分</strong>
					</span>
				</div>
			</div>
			
			</div>
			
			<div class="tab-pane {php if($reply['award_type'] == 2) echo 'active';}" id="sn">
			
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span>奖励类型</label>
				<div class="col-sm-9" id="myTab1">
					<label class="radio-inline">
						<a href="#none"><button type="button" class="btn btn-default">无奖励</button></a>
					</label>
					<label class="radio-inline">
						<a href="#jifen"><button type="button" class="btn btn-default">积分</button></a>
					</label>
					<label class="radio-inline">
						<a href="#sn"><button type="button" class="btn btn-default active">兑换码</button></a>
					</label>
				</div>
			</div>
			
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span>分割符</label>
				<div class="col-sm-9">
					<input type="text" class="form-control"  name="fenge"  value="{$reply['fenge']}">
					<span class='help-block'>
						<strong class="text-danger">多个兑换码之间的分割符号，如【123,456,789】的分割符为,<br/>
						换行请使用\n</strong>
					</span>
				</div>
			</div>
			
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span>兑换码</label>
				<div class="col-sm-9">
					<textarea class="form-control content" name="snm"   placeholder="123,456,789"  rows="4" onkeyup="if (this.value.split('\n').length>4) this.rows=this.value.split('\n').length;">{$out}</textarea>
					<span class='help-block'>
						<strong class="text-danger">要发放的兑换码</strong>
					</span>
				</div>
			</div>
			
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">兑换码发放情况</label>
				<div class="col-sm-9">
					<a href="{php echo url('site/entry/download', array('m' => 'hdkj_scan','rid' => $rid,'action' => 2));}" target="_blank"><button type="button" class="btn btn-default">导出已使用的</button></a>
					<a href="{php echo url('site/entry/download', array('m' => 'hdkj_scan','rid' => $rid,'action' => 1));}" target="_blank"><button type="button" class="btn btn-default">导出未使用的</button></a>
					<span class='help-block'>
						<strong class="text-danger">可导出本活动发放过的全部兑换码</br>
						更新上面的兑换码可以修改还未发放的兑换码</strong>
					</span>
				</div>
			</div>
			
			</div>
			
			</div>
		</div>
	</div>
</div>


<script>
require(['jquery', 'util'], function($, util){
	$(function(){
		$('#reply-form').submit(function(){
			var result = true;
			return result;
		});
	});
});
</script>
<script type="text/javascript">
$(function () {
  $('#myTab a').click(function (e) {
    e.preventDefault();//阻止a链接的跳转行为
    $(this).tab('show');//显示当前选中的链接及关联的content
	if($(this).tab()[0]['hash'] == '#article'){
		$("#type").val(0);
    }
    if($(this).tab()[0]['hash'] == '#image'){
		$("#type").val(1);
    }
  })
});
$(function () {
  $('#myTab1 a').click(function (e) {
    e.preventDefault();//阻止a链接的跳转行为
    $(this).tab('show');//显示当前选中的链接及关联的content
	if($(this).tab()[0]['hash'] == '#none'){
		$("#award_type").val(0);
    }
    if($(this).tab()[0]['hash'] == '#jifen'){
		$("#award_type").val(1);
    }
	if($(this).tab()[0]['hash'] == '#sn'){
		$("#award_type").val(2);
    }
  })
});
</script>